<script>
export default {
	
  onLaunch: function () {
    const userLoginInfo = uni.getStorageSync("token");
	/*  */
    if (userLoginInfo) {
      // TODO 不存在的模块
      // this.$store.commit("m_message/changeMessageList");
      // this.$store.commit("m_user/getUserInfo");
	  /* */
	  this.$store.state.isOpenSocket = true
	  this.$ws.init();
	  // this.$store.commit('m_message/addCount')
      // #ifdef APP-PLUS
      if (plus || false) {
        plus.navigator.closeSplashscreen();
      }
      // #endif
    } else {
      uni.reLaunch({
        url: "pages/logo/logo",
        success: () => {
          // #ifdef APP-PLUS
          if (plus) {
            plus.navigator.closeSplashscreen();
          }
          // #endif
        },
      });
      // }, 1000)
    }
    // #ifdef APP-PLUS
    if (plus || "") {
      plus.navigator.closeSplashscreen();
    }
    plus.navigator.closeSplashscreen();
    // #endif
  },
  onShow: function () {
    const token = uni.getStorageSync("token");
    //
    if (!this.$store.state.isOpenSocket) {
      if (token) {
        this.$ws.init();
      }
    }
  },
  onHide: function () {},
};
</script>

<style lang="scss">
/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";

/*  */
@import "@/static/styles/generate.scss";
@import "@/static/styles/expand.scss";
/*  */
@import "./new_file.scss";

/** font_b*/
@import "@/static/iconfont.css";
</style>
